home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / network / ethernet / readme.pkd < prev    next >
Text File  |  1994-07-26  |  4KB  |  67 lines

  1. INFOS TO BUILD PKTDRV.PRG========================
  2. 256 bytes stack are sufficient for this version (RIEBL CARD PLUS).urn off stack-
  3. checking.
  4. I used PURE-C to develop this driver, see the .prj file how to link allbjects.
  5. PKTDRV.PRG adds a cookie named '_PKT', its value is a pointer to jumptable. All 
  6. functions use the PURE-C register parameter passingonvention, that is, integer t
  7. ypes in D0,D1 , pointers in A0,A1 rom first parameter to last respectively.
  8. Supported functions are:
  9. int net_info(int length_of_buffer, char *buffer);
  10. Gives information about traffic on the node. This function is not developed to i
  11. ts final state and is subject tohange in the future)eturn: negative errorcode or
  12.  length of copied data.
  13. int net_open(int protocol, int (*handler)(int length,char *pkt));
  14. Tells the driver the address of a packet handler, which wants toeceive packets o
  15. f a specific ethernet protocol. Up to 5 differentrotocols are allowed at the mom
  16. ent (only 2 (ARP and IP) are used by ur apps)eturn: negative errorcode or 0 if s
  17. uccesful.
  18. The protocol-handler function gets the length (in D0) and the addressin A0) of a
  19.  newly arrived packet. If the handler accepts the packett returns a nonzero valu
  20. e, otherwise it returns zero and the packet river discards the packet. Accepted 
  21. packets must be freed usinget_pktfree after processing. The protocol-handler run
  22. s on interruptevel, therefore no stack-checking is allowed
  23. int net_release(int protocol);
  24. Removes a protocol from the protocoltable. Any further incomingackets of this pr
  25. otocol are discarded by the packet driver.eturn: negative errorcode or 0 if succ
  26. essful.
  27. int net_send(int length, char *pkt);
  28. Send a packet. The packet is sent as it is, any headers (inclusive thernet heade
  29. r) must be filled by the caller. This function waitsntil the packet is sent or a
  30.  error is returned from the chip.nly packets allocated by net_pktalloc or got fr
  31. om the protocol-pcall should be handed to this function.eturn: negative errorcod
  32. e or length of sent packet, if successful.
  33. (Note: The length of the sent packet may be greater than the originalacket, sinc
  34. e the minimum length of a ethernet packet is 60 bytes).
  35.  
  36. int net_getadr(int length_of_buffer,char *addr_buffer);
  37. Fills addr_buffer with the local hardware address.eturn: number of copied bytes 
  38. or negative errorcode
  39. int net_reset(void);
  40. Reset the packet driver to a state like after startup, any activerotocol is abor
  41. ted.eturn: 0 if successful or negative errorcode
  42. PKTBUF *net_pktalloc(u_short length_of_packet);
  43. Allocates a block of memory to hold a packet. If the interfacerovides onboard me
  44. mory, it is strongly recommended to allocatehis block onboard to avoid unneccess
  45. ary copying of data.eturn: pointer to new allocated packet or NULL if out of mem
  46. .
  47. int net_pktfree(PKTBUF *);
  48. Free a packet allocated by net_pktalloc or handed by the protocol-andler upcall.
  49. eturn: 0 if successful or negative errorcode.
  50. Indices to the jumptable are provided in pktdrv.h
  51. Any suggestions would be appreciated.
  52.     Hans Wieser
  53. ---
  54.  
  55. Support for other Ethernet cards:--------------------------------
  56. The packet driver forms the interface to any Ethernet card applied toour ATARI. 
  57. So if you would like to use any other card than theIEBL card you simply have to 
  58. change this program.e did this for a Dlink DE600 pocket adaptor usually fitted t
  59. o thearallel port of an IBM-PC. Since the ATARI does not provide allf the requir
  60. ed signals on its parallel port, we did some simplenterface hardware for the car
  61. tridge port. The file "adaptor.img"hows the principle of this piece. The packet 
  62. driver for the DE600ou can find in the file "dlinkdrv.prg".
  63. The sources for packet drivers are provided in pktdrv/pktdlink and
  64. pktdrv/pktlance.
  65.  
  66.     Peter Mayer
  67.